<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
//////////////////////////// index.jsp ////////////////////////////////
/*
     설명 : index.jsp
     작성자 : 서성수
     프로그램 작성 일자 : 2014.07.16
*/
//////////////////////////// index.jsp ////////////////////////////////
String defaultURL = "/";
//System.out.println("defaultURL : " + defaultURL);

// 헤더에서 스마트폰 여부확인 후 리다이렉트
int viewType = 0;
String agent = request.getHeader("USER-AGENT");

//System.out.println("agent : " + agent);

String[] mobileos = {"iPhone","iPod","Android","BlackBerry","Windows CE","Nokia","Webos","Opera Mini","SonyEricsson","Opera Mobi","IEMobile"};
int j = -1;

for(int i=0;i<mobileos.length;i++){
    j=agent.indexOf(mobileos[i]);
    if(j>-1){
        // 모바일로 접근했을 때
        //System.out.println("os - : "+agent);
        viewType = 1;
        break;
    }
}

if(viewType == 0){
    //response.sendRedirect("/event/web/getWebMain");
    //response.sendRedirect("https://ollehid.event.olleh.com:8443/event/web/getWebMain");
} else {
    //response.sendRedirect("/event/mobile/getMobileMain");
    //PageContext.forward( "./SalesMod.jsp" ); 
    //response.sendRedirect("https://ollehid.event.olleh.com:8443/event/mobile/getMobileMain");
}

%>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
</head>
<body>
<h2>Test Page</h2>
3 + 4 = <%=3+4%> <BR>
<iframe src="http://www.nlotto.co.kr/lotto645Stat.do?method=statByNumber" width="1024" height="540">
</body>
</html>